package cn.seecoder.courselearning.po.reply;

import cn.seecoder.courselearning.vo.reply.ReplyVO;
import lombok.NonNull;

import java.util.Date;

public class Reply {
    private Integer id;

    private String content;

    private Date createTime;

    private Integer userId;


    private Integer courseId;

    private Integer replyingCommentId;

    private Integer replyingPostId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getReplyingCommentId() {
        return replyingCommentId;
    }

    public void setReplyingCommentId(Integer replyingCommentId) {
        this.replyingCommentId = replyingCommentId;
    }

    public Integer getReplyingPostId() {
        return replyingPostId;
    }

    public void setReplyingPostId(Integer replyingPostId) {
        this.replyingPostId = replyingPostId;
    }


    public Reply(){

    }
    public Reply(@NonNull ReplyVO replyVO){
        this.id = replyVO.getId();
        this.createTime = replyVO.getCreateTime();
        this.content = replyVO.getContent();
        this.userId = replyVO.getUserId();
        this.courseId = replyVO.getCourseId();
        this.replyingCommentId = replyVO.getReplyingCommentId();
        this.replyingPostId = replyVO.getReplyingUserId();
    }
}
